def reverse(number):
    temp = ""
    while number>10:
        n1,number = number%10,number // 10
        temp += str(n1)
    temp += str(number)
    return eval(temp)

number = eval(input("请输入一个数："))
print(reverse(number))